<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.xteam.ecsystem.utils.AppConfig"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

// 获取等级图标路径
String gradeIconPath = AppConfig.getGradeImagePath();
// 获取图片实际根目录
String realpath = AppConfig.getRealPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>积分管理-等级规则</title>
    <jsp:include page="../../include/base.jsp"></jsp:include>
	<jsp:include page="../../include/common.jsp"></jsp:include>
	<jsp:include page="../../include/baseManage.jsp"></jsp:include>
	
	<script type="text/javascript">
			var __gradeIconPath = "<%=gradeIconPath %>";
			var __realpath = '<%=realpath%>';
	</script>
  </head>
  <body>   
  	<div class="mini-toolbar" style="border:0;font-size:12px;padding-left:6px;"> 
        <!-- 操作面板 -->
        <div class="operatePanel">
	       	<input class="mini-button" text="添加规则" iconCls="icon-addnew" plain="false" 
	       		onclick="GradeRuleHandler.addGradeRule" visible="false" id="grade_rule_add"/>
	       	<input class="mini-button" text="编辑规则" iconCls="icon-edit" plain="false" 
	       		onclick="GradeRuleHandler.editGradeRule" visible="false" id="grade_rule_edit"/>
	       	<input class="mini-button" text="刷新" iconCls="icon-btn-refresh" plain="false" 
	       		onclick="GradeRuleHandler.afresh" visible="false" id="grade_rule_refresh"/>
	    </div>
    </div>
    <div class="mini-fit" id="gradeRulePanel">
	    <div id="gradeRuleGrid" class="mini-datagrid" fitColumns="true" style="width:100%;height:100%;" 
	    	multiSelect="true" pageSize="20" borderStyle="border-bottom:0;border-left:0;border-right:0;"
	    	virtualScroll="true" idField="bgrId" url="<%=path %>/getGradeRuleList.do">
	        <div property="columns">
	        	<div type="checkcolumn"></div>
	            <div field="bgrId" width="60" headerAlign="center">等级序列</div>
	            <div field="bgrIcon" width="100" headerAlign="center">等级图标</div>
	            <div field="bgrName" width="100" headerAlign="center">等级名称</div>
	            <div field="bgrUprule" width="300" headerAlign="center">升级规则（EXP）</div>
	            <div field="bgrDownrule" width="300" headerAlign="center">降级规则（EXP）</div>
	            <div field="bgrState" width="80" headerAlign="center" align="center">是否启用</div>
	        </div>
	    </div>
    </div>
  </body>
  <script src="handler/GradeRuleHandler.js" type="text/javascript"></script>
</html>
